﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace S.Produce.Infrastructure
{
    public interface IRepository<T> where T : class
    {
        Task<int> CreateAsync(T entity);

        Task<int> UpdateAsync(T entity);

        Task<int> DeleteAsync(List<T> t);

        Task<T> GetAsync(int id);

        Task<List<T>> GetAllAsync();

        Task<List<T>> SelAllAsync(Expression<Func<T, bool>> expression);
    }
}
